package Vehicle;

public class Bus extends Vehicle {

	//客车特有属性：座位数
	private int seatCount;
	
	public int getSeatCount() {
		return seatCount;
	}

	public void setSeatCount(int seatCount) {
		this.seatCount = seatCount;
	}

	//构造无参方法
	public Bus() {
		super();
	}
	//构造有参方法
	public Bus(String id, String brand, double perRent, int seatCount) {
		super(id, brand, perRent);
		this.seatCount = seatCount;
	}
	
	@Override
	public double calcRent(int days) {
		double rent=getPerRent()*days;
		if(days>3 && days<7) {
			rent*=0.9;
		}else if (days>=7 && days<30) {
			rent*=0.8;
		}else if (days>=30 && days<150) {
			rent*=0.7;
		}else if (days>=150) {
			rent*=0.6;
		}
		return rent;
	}

	@Override
	public String toString() {
		return super.toString()+"，座位数是："+seatCount;
	}
}
